#ifndef OBJC_METHOD_SIG_H
#define OBJC_METHOD_SIG_H

#include <sobjc-commons/st.h>
#include <sobjc-commons/str_list.h>
#include <sobjc-commons/type.h>
#include "node.h"

typedef struct objc_method_sig *objc_method_sig_t;

struct objc_method_sig {
  const char *name;
  int nargs;
  int vargs;
  char *mtype_name;
  char *ptype_names;
  char *imp_type;
  char *mctype;
  char **pctypes;           /* for local method signature validation */
  objc_type_encoding_t enc; /* for global method signature validation */
};

objc_method_sig_t objc_register_global_method_sig(const char *, objc_node_t);
objc_method_sig_t objc_get_global_method_sig(const char *);
objc_method_sig_t objc_get_method_sig(objc_method_sig_t, const char *);

objc_type_encoding_t objc_make_type_encoding_from_node(objc_node_t);
char *objc_generate_type_name(objc_node_t, BOOL);

#endif /* OBJC_METHOD_SIG_H */

